<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>余额</title>
<link rel="stylesheet" type="text/css" th:href="@{/plugin/layui/css/layui.css}" />
<script type="text/jscript" th:src="@{/plugin/layui/layui.js}" charset="UTF-8"></script>
<script type="text/jscript" th:src="@{/plugin/jquery.min.js}"></script>
<link rel="stylesheet" type="text/css" th:href="@{/src/ssj/css/customerShow.css}" media="all" />
</head>
<body>
	 <table class="layui-hide" id="AllBalance"></table>
	 <table class="layui-hide" id="balance"></table>
	 <table class="layui-hide" id="spendDetail"></table>
<script type="text/javascript">         
layui.use('table', function(){
  var table = layui.table;
  table.render({
    elem: '#AllBalance',
    url:'[[@{/customer/showAllBalance}]]',
    method: 'get',
    page:true,
    limit:10,
    cols: [
    	[
      {field:'cid',width:120,align : 'center',title: '顾客编号' , sort:true},
      {field:'ctel',width:120,align : 'center',title: '顾客电话',sort: true},
      {field:'cname',width:120,align : 'center',title: '顾客名字',},
      {field:'cwtotal',width:120,align : 'center',title: '余额', sort: true} 
    ]
    	]
  });
});
</script>
<script type="text/javascript">         
layui.use('table', function(){
  var table = layui.table;
  table.render({
    elem: '#balance',
    url:'[[@{/customer/showBalance}]]',
    method: 'get',
    cols: [
    	[
      {field:'cid',width:120,align : 'center',title: '顾客编号' , sort:true},
      {field:'ctel',width:120,align : 'center',title: '顾客电话',sort: true},
      {field:'cname',width:120,align : 'center',title: '顾客名字',},
      {field:'cwtotal',width:120,align : 'center',title: '余额', sort: true} 
    ]
    	]
  });
});
</script>
<script type="text/javascript">         
layui.use('table', function(){
  var table = layui.table;
  table.render({
    elem: '#spendDetail',
    url:'[[@{/customer/showSpendDetail}]]',
    method: 'get',
    page:true,
    limit:10,
    cols: [
    	[
      {field:'sname',width:120,align : 'center',title: '商店名称' , sort:true},
      {field:'octime',width:120,align : 'center',title: '消费时间',sort: true},
      {field:'ototal',width:120,align : 'center',title: '顾客额',}
    ]
    	]
  });
});
</script>
</body>
</html>
